@import "common";

//头部
$header-bg: #303643;
$header-hover: #40485b;
$header-line: #2a2f32;
$header-height: 64px;
//侧边栏
$sidebar-bg: #304156;
$sidebar-sub-bg: #1f2d3d;
$sidebar-hover: #001528;
$sidebar-width: 240px;
$sidebar-width-min: 64px;
$subMenuBg: #1f2d3d;
$menuHover: #001528;

.layout-main {
    display: flex;

    .logo {
        @include center;
        height: $header-height;
        width: $sidebar-width;
        background: $sidebar-bg;
        transition: all 0.28s ease-out;
        position: fixed;
        top: 0;
        z-index: 1001;
        img {
            max-height: $header-height;
            max-width: $sidebar-width;
        }
    }

    //隐藏侧边栏
    &.hidderSidebar {
        .layout-sidebar-container {
            width: $sidebar-width-min;
            .logo {
                width: $sidebar-width-min;
            }
        }

        .layout-container {
            padding-left: $sidebar-width-min;
        }
    }

    .layout-sidebar-container {
        background: $sidebar-bg;
        position: fixed;
        top: 0;
        bottom: 0;
        width: $sidebar-width;
        overflow: hidden;
        color: #fff;
        overflow-y: auto;
        z-index: 1000;
        padding-top: 60px;
        &::-webkit-scrollbar {
            display: none;
        }
        transition: all 0.28s ease-out;

        .el-menu {
            width: 100% !important;
            min-height: 100%;
            border-right: none;
            box-sizing: border-box;
        }
        .el-submenu .el-menu-item {
            min-width: 180px !important;
            background-color: $subMenuBg !important;
            &:hover {
                background-color: $menuHover !important;
            }
        }

        
    }

    .layout-container {
        box-sizing: border-box;
        position: absolute;
        top: 0;
        bottom: 0;
        padding-left: $sidebar-width;
        width: 100%;
        transition: all 0.28s ease-out;

        .layout-header-container {
            display: flex;
            height: $header-height;
            background: #fff;
            .header-left {
                flex: 1;
                @include left;

                .sidebar-trigger {
                    box-sizing: border-box;
                    align-self: center;
                    padding: 0 10px;
                    i {
                        font-size: 22px;
                        cursor: pointer;
                        color: #aeb9c2;
                        transition: all 0.3s;
                    }
                    .t1 {
                        transform: rotateZ(-90deg);
                    }
                }
                .custom-bread-crumb {
                    margin-left: 10px;
                }
            }

            .header-right {
                flex: 2;
                @include right;
            }
        }

        .layout-content-container {
            .content-wrapper {
                position: relative;
                box-sizing: border-box;
                width: 100%;
                overflow: auto;
                background: #f0f2f5;
                &-view {
                    padding: 18px;
                    box-sizing: border-box;
                    
                }
                &-body {
                    padding: 10px;
                    border: 1px solid #e8eaec;
                    background: #fff;
                    border-radius: 4px;
                    font-size: 14px;
                    position: relative;
                    transition: all 0.2s ease-in-out;

                    &:hover {
                        border-color: #eee;
                        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
                    }

                    .filter-wrapper {
                        display: flex;
                        justify-content: flex-start;
                        align-items: center;
                        padding: 5px 0;
                        .el-form-item {
                            margin: 0 0 5px 0;
                            .el-form-item__content {
                                margin-right: 10px;
                            }
                        }
                        button {
                            margin: 0 10px 5px 0;
                        }
                    }
                }
            }
        }
    }
}
